package com.theaf.core.rmq.common;

import lombok.Data;

/**
 * @Author:songwenke
 * @Description:消息队列处理方法的返回对象
 * @Date:create in 16:29 2018/3/28
 * @Modified By:
 **/
@Data
public class MqReturn {
    private boolean success;
    private Object data;
    private MqReturn(){

    }
    private MqReturn(boolean success,Object data){
        this.success = success;
        this.data = data;
    }
    public static MqReturn success(Object data){
        return new MqReturn(true,data);
    }
    public static MqReturn error(Object data){
        return new MqReturn(false,data);
    }
}
